ages={
    "Alice":25,
    "Bob":30,
    "Charlie":35,
    "David":40  
    
    
}
print(ages["Alice"])
#默认是键
for key in ages:
    print(key, type(key))
#遍历键
for key in ages.keys():
    print(key,type(key))
#遍历值
for value in ages.values():
    print(value,type(value))
#遍历键值对
for item in ages.items():
    print(item,type(item))#默认是元组
#拆包解包
for key,value in ages.items():
    print(key,value)
#声明空集合或字典时候怎么区分
addd = {}
print(type(addd))#默认是字典
set()#集合
print(type(set()))
